Advanced Debug Tips

Further reading: AppVeyor - A good continuous integration system is a joy to behold

How to use CI Tools

Bdbcat has responded to several questions, explaining how these features should be used.

1. How to get Alpha/Beta Testers familiar with Github and locating those compiled files?

2. Are these eventually going to be the source for the Website Downloads page?

Summary

Testing a CI Product is like sneaking a spoon-sip of the dinner simmering on the stove while Mom is not looking. She knows it needs salt, and is way too hot to eat yet. If you drop dead immediately, she wants to know about it. Otherwise, she wants to not hear too many comments. Wait until it comes to the table. Meanwhile, go outside and play….

Dave

How CI Tools work

Using an example from Sean's Weatherfax plugin.

For Windows, use Appveyor.

1. Go to Sean's Weatherfax_pi github repository

https://github.com/seandepagnier/weatherfax_pi

2. Click on the Code Tab

Select the “Branch” you want to be on, most of the time it will be “master”

CI-1

https://github.com/seandepagnier/weatherfax_pi/commits/master

CI-2

4. Find the most recent commit

Lets say it is “yet more inlines” from Feb 11 2018

5. Click on the Green Check at the end

A popup for the Continuous Integration Links for TravisCI and AppVeyor come up.

CI-3

6. Click on AppVeyor "Details"

The page will come up with the “Console” Tab.

https://ci.appveyor.com/project/seandepagnier/weatherfax-pi/build/1.0.13

CI-4

7. Click on the "Artifacts" Tab

To get to the download executable.

https://ci.appveyor.com/project/seandepagnier/weatherfax-pi/build/1.0.13/artifacts

CI-5

You should then be able to download the weatherfax_pi-1.8.001-win32.exe by clicking on it.

Push build to Git Repository with a push tag

In both .travis and appveyor it is possible to initiate the push of a build to your Git repository.

.travis

For travis refer to Petri's post #637

You can use it as it is, the MacOSX part was helped to package FAI (fully automated installation) by Nereus32 here. The two build target conditional variables are courtesy from Sean d'Epagnier from whom I have shamelessly stolen that part. But that's not all, you are certainly better aware than I am about the different Cmake include files in cmake-directory. In this case, there is a small modification for Mac in packaging, courtesy of Nereus32. Anyway, it takes for a while before, for each commit, both Linux and Mac builds correctly. There is no point to continue before they do.

You need a travis CLI (command line interface). It is needed to encrypt the GitHub token. The encrypted string is put in your personal .travis.yml file. Unlike in AppVeyor, there is no on-line service for it, not that I know. That's why you need to start with travis CLI installation. Here are some installation instructions for Windows, I used Linux where the installation was straightforward.

When you are sure that you have travis CLI up and working, you can start to create the encrypted key. Without it, deployment to GitHub does not work.

  Create an API token for travis in GitHub here https://github.com/settings/tokens (Developer tools). Select all rights to repository and repository only (that's enough - if it does not work, it is something else). Don't close the window, or make sure you have copied the key to your computer.
  Open command window and give following command (in Linux) with travis CLI:
  echo pasteGitHubTokenHere | travis encrypt -r rgleason/reponameHere --org
  It gives you out a very long arbitrary string in format "1234abcde....f". You need to copy and paste it in .travis.yml in secure field as one single line. Don't let your editor to break it on different lines.
  Warning: you will find from the wonderful interweb instructions which are supposed to modify the .travis.yml on the fly. Believe me, I tried and they screwed up completely the file. Stick to copy-paste.

When you commit .travis.yml file, the travis build starts. It is good to check that both of its build processes do pass faultlessly before the next step.

In GitHub create a repository, like v1.2.3 as tag, description is free but it is good to contain the version. Here is where Travis and AppVeyor both deploy the built contents. When you hit the create button it is a sign for Travis and AppVeyor to start the build which will end up with deployment (the condition flags in the configuration file are defining this. That's why it is important that you check before you create the repository that all builds do pass faultlessly, you will not get a second chance but you need to create a new repository. (Repositories cannot be deleted since they are, in fact defined by tags.)

If you observe 401 error at the deployment phase in travis logs search in google.com with the following phrase for possible causes “travis github https://api.github.com/user: 401 - bad credentials”

for Appveyor

For appveyor refer to

Git push origin [tag] like“v1.9.1-ov42” can now result in Appveyor push via webhooks (read, write) to a new Github Release. See Use of appveyor 'auth_token' to push a new github release

And PR appveyor auth_token, changes, version 1.9.2 ov42 #135